<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>

        table {
            border: 1px solid #000;
            width: 800px;
            height: 600px;
            /*这个css属性可以控制表格的单元格之间的空隙*/
            border-collapse: collapse;
            text-align: center;
        }
        td {
            border: 1px solid #000;
        }

    </style>
</head>
<body>

<script>

    /*
    * document.write("");  生成结构
    *
    * */

    var str = "<table>";
        for(var i = 0; i < 10; i++){
            str += "<tr>";
            
            for(var j = 0; j < 10;j++){
                str += "<td>"+ j +"</td>";
            }
            str += "</tr>";
        }

    str += "</table>";

    document.write(str);

</script>
</body>
</html>